package com.msb.mall.thirdPart.controller.upload;

import com.msb.common.vo.CommonResult;
import com.msb.mall.thirdPart.utils.Upload2Aliyun;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("thirdPart/aliyun")
public class UploadAliyunController {

    @Autowired
    private Upload2Aliyun upload2Aliyun;

    @PostMapping("/uploadSingle")
    public CommonResult uploadSingle() throws Exception {
        upload2Aliyun.uploadFile();

        System.out.println("上传阿里云服务器...");
        return CommonResult.success();
    }
}
